********
*First panel of Figure 3, within Finland
********

* Loading the dataset for analysis
use "$path/industry_data.dta", clear

* Generating interaction terms for each year and the treatment variable
forvalues x = 34(1)70 {
    gen repam19`x' = ydum19`x' * treat_std_l 
}

* Defining a local macro for years 
local years "1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970"

* Labeling variables
foreach l of local years {
    label var repam`l' `l'
}

* Defining control variables for the regression model
global sharecontrols c.lnlabor_all1943#year c.power_labor_share1943#year c.ln_relative_wage1943#year c.ln_establishments1943#year c.skilled1943#year c.ln_inputs_all1943#year c.ln_valueadded1943#year 

* Defining control variables for the regression model availabel in both countries
global sharecontrols2 c.ln_value_prod1943#year c.lnlabor_all1943#year 

* Creating a list of interaction terms for use in regression
local repaflexible1 "repam1934 repam1935 repam1936 repam1937 repam1938 repam1939 repam1940 repam1941 repam1942 repam1944 repam1945 repam1946 repam1947 repam1948 repam1949 repam1950 repam1951 repam1952 repam1953 repam1954 repam1955 repam1956 repam1957 repam1958 repam1959 repam1960 repam1961 repam1962 repam1963 repam1964 repam1965 repam1966 repam1967 repam1968 repam1969 repam1970"
tempfile p1 p11  

* Executing regression for ln_value_prod and saving results
parmby "reghdfe ln_value_prod `repaflexible1', absorb(year isic $sharecontrols) vce(cluster isic)", lab saving(`"`p1'"', replace) idn(1) ids(Unadjusted)

* Executing regression for lnlabor_all and saving results
parmby "reghdfe lnlabor_all `repaflexible1', absorb(year isic $sharecontrols) vce(cluster isic)", lab saving(`"`p11'"', replace) idn(1) ids(Unadjusted)

* Preparing data for graphing ln Value of Production
preserve 
clear all
set obs 1
gen year = 1943
gen estimate = 0
gen parm = "repam1943"
gen min95 = 0
gen max95 = 0
append using `p1'
keep if regexm(parm, "^repa*")
gen yearstr = substr(parm, -4, 4)
destring yearstr, replace
sort yearstr
tempfile tprod1
save `tprod1'

* Graphing and saving the estimates for ln Value of Production
twoway (scatter estimate yearstr, msize(medium) mcolor(dknavy)) (rspike min95 max95 yearstr, lcolor(dknavy)), xsize(6) ysize(4) xtitle("Year") xline(1944 1952, lcolor(maroon)) title("Difference-in-Difference Estimates of ln Value of Production") xlabel(1934(1)1970) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off) xlabel(#8)  ylabel(-.2 0 .2 .4) saving(flexible_prod_fin.gph, replace)

*Black and white
twoway (rspike min95 max95 yearstr, lcolor(gs10)) (scatter estimate yearstr, msize(medium) mcolor(gs0)) , xsize(6) ysize(4) xtitle("Year") xline(1944 1952, lcolor(gs10)) title("Difference-in-Difference Estimates of ln Value of Production") xlabel(1934(1)1970) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off) xlabel(#8)  ylabel(-.2 0 .2 .4) saving(flexible_prod_fin_bw.gph, replace)
restore 

* Preparing data for graphing ln Labor Force
preserve 
clear all
set obs 1
gen year = 1943
gen estimate = 0
gen parm = "repam1943"
gen min95 = 0
gen max95 = 0
append using `p11'
keep if regexm(parm, "^repa*")
gen yearstr = substr(parm, -4, 4)
destring yearstr, replace
sort yearstr
tempfile tlabor1
save `tlabor1'

* Graphing and saving the estimates for ln Labor Force
twoway (scatter estimate yearstr, msize(medium) mcolor(dknavy)) (rspike min95 max95 yearstr, lcolor(dknavy)), xsize(6) ysize(4) xtitle("Year") xline(1944 1952, lcolor(maroon)) title("Difference-in-Difference Estimates of ln Labor Force") xlabel(1934(1)1970) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off) xlabel(#8) ylabel(-.2 0 .2 .4) saving(flexible_labor_fin.gph, replace)

*Black and white
twoway (rspike min95 max95 yearstr, lcolor(gs10)) (scatter estimate yearstr, msize(medium) mcolor(gs0)) , xsize(6) ysize(4) xtitle("Year") xline(1944 1952, lcolor(gs10)) title("Difference-in-Difference Estimates of ln Labor Force") xlabel(1934(1)1970) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off) xlabel(#8) ylabel(-.2 0 .2 .4) saving(flexible_labor_fin_bw.gph, replace)
restore 

********
**Table 4
********

use  "$path/ind_ddd.dta", clear

foreach x in ln_value_prod lnlabor_all {
reghdfe `x'   scaledpost_finland treat_post  finland_post, absorb(year_country isic_country ) vce(cluster isic_country) 
estadd local ii "140"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 " "
estadd local c2 "Yes"
estimates store p`x'1 
}

foreach x in ln_value_prod lnlabor_all {
reghdfe `x' scaledpost_finland treat_post  finland_post , absorb(year_country isic_country $sharecontrols2) vce(cluster isic_country) 
estadd local ii "116"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 "\checkmark"
estadd local c2 "Yes"
estimates store p`x'2
}


foreach x in ln_value_prod lnlabor_all {
reghdfe `x' scaledpost_finland treat_post  finland_post if timberpaper==0, absorb(year_country isic_country $sharecontrols2) vce(cluster isic_country) 
estadd local ii "116"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 "\checkmark"
estadd local c2 "No"
estimates store p`x'3 
}


label var treat_post "Reparations share x Post"

label var scaledpost_finland "Reparations share x Post x Finland"

label var finland_post "Post x Finland"

	
foreach x in ln_value_prod lnlabor_all {
reghdfe `x' treat_post_he_fin treat_post_le_fin     treat_post_he treat_post_le   finland_post , absorb(year_country isic_country) vce(cluster isic_country) 
estadd local ii "116"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 "\checkmark"
estadd local c2 "Yes"
estimates store h`x'1
}
	
	
foreach x in ln_value_prod lnlabor_all {
reghdfe `x' treat_post_he_fin treat_post_le_fin     treat_post_he treat_post_le   finland_post , absorb(year_country isic_country $sharecontrols2) vce(cluster isic_country) 
estadd local ii "116"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 "\checkmark"
estadd local c2 "Yes"
estimates store h`x'2
}


foreach x in ln_value_prod lnlabor_all {
reghdfe `x' treat_post_he_fin treat_post_le_fin     treat_post_he treat_post_le   finland_post if timberpaper==0, absorb(year_country isic_country $sharecontrols2) vce(cluster isic_country) 
estadd local ii "116"
estadd local ife "\checkmark"
estadd local yfe "\checkmark"
estadd local c1 "\checkmark"
estadd local c2 "No"
estimates store h`x'3 
}

label var treat_post_he "Reparations share x Post x HS"
label var treat_post_le "Reparations share x Post x LS"
label var treat_post_he_fin "Reparations share x Post x Finland x HS"
label var treat_post_le_fin "Reparations share x Post x Finland x LS"


esttab   pln_value_prod2 pln_value_prod3  hln_value_prod2 hln_value_prod3 plnlabor_all2 plnlabor_all3  hlnlabor_all2 hlnlabor_all3 using   "$tables/DDD_results_norway_hetero.tex", ///
mgroups("ln Value of Production" "ln Labor Force",  pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) ) ///
	replace  keep(scaledpost_finland treat_post treat_post_he_fin treat_post_le_fin treat_post_he treat_post_le) order(scaledpost_finland treat_post) nonotes ///
	 b(%9.3f) se(%9.3f) stats(N c1  ife yfe c2, fmt(0 3) layout(@ @) ///
		labels("N"  "Controls" "Year-Country FE"  "Industry-country FE" "Established"  ///
			)) ///
	label star(* .1 ** .05 *** .01) nodepvars nomtitle 

********	
*Figure 2
********

preserve

gen y=exp(ln_value_prod)

replace decile_repashare_2=5 if timberpaper==1
replace decile_repashare_2=0 if decile_repashare_2==.
replace decile_repashare_2=2 if decile_repashare_2==1

collapse (sum)  y, by(decile_repashare_2 year finland)

gen country="FIN"
replace country="NOR" if finland==0
drop finland

reshape wide y, i(decile_repashare_2 year) j(country) string
sort decile_repashare_2 year
bys decile_repashare_2 : gen index_gross_fin=(yFIN/yFIN[5])*100
bys decile_repashare_2 : gen index_gross_nor=(yNOR/yNOR[5])*100

*Finland
tw (connected index_gross_fin year if decile_repashare_2==2, lcolor(dknavy) msymbol(Oh)) (line index_gross_fin year if decile_repashare_2==5, lcolor(maroon) lpattern(dash) msymbol(T)) (connected index_gross_fin year if decile_repashare_2==0, lcolor(dkgreen) msymbol(Dh) mcolor(dkgreen)) , xline(1944) xline(1952) legend(position(6) rows(2) symxsize(*.5) label(1 "Reparation Industries") label(2 "Established Industries") label(3 "Non-Reparation Manufacturing")) xlabel(1935(5)1970) graphregion(lcolor(white) fcolor(white)) ytitle(Index of production value) xline(1939, lcolor(black) lpattern(dash)) xline(1940, lcolor(black) lpattern(dash)) xline(1941, lcolor(grey) lpattern(shortdash)) xline(1944, lcolor(grey) lpattern(shortdash)) text(700 1939.5 "First Soviet-Finnish War", size(small) orient(vertical)) text(600 1942.5 "Second Soviet-Finnish War", size(small) orient(vertical)) text(700 1948 "War reparations", size(small) angle(vertical)) ylabel(0(200)1000) saving(Graph1, replace) title(Finland industry trends)

*Norway
tw (connected index_gross_nor year if decile_repashare_2==2, lcolor(dknavy)   msymbol(Oh) ) (line index_gross_nor year if decile_repashare_2==5, lcolor(maroon) lpattern(dash) msymbol(T)) (connected index_gross_nor year if decile_repashare_2==0, lcolor(dkgreen) msymbol(Dh) mcolor(dkgreen))      ///
, xline(1944)  xline(1952) legend(position(6) rows(2) symxsize(*.5) label(1 "Reparation Industries") label(2 "Established Industries") label(3 "Non-Reparation Manufacturing")) xlabel(1935(5)1970)   graphregion(lcolor(white) fcolor(white)) ytitle(Index of production value )   xline(1939, lcolor(black)lpattern(dash)) xline(1940, lcolor(black) lpattern(dash))  xline(1941, lcolor(grey) lpattern(shortdash)) xline(1944, lcolor(grey) lpattern(shortdash)) text(700 1939.5 "First Soviet-Finnish War", size(small)  orient(vertical)) text(600 1942.5 "Second Soviet-Finnish War", size(small) orient(vertical)) text(700 1948 "War reparations", size(small) angle(vertical)) ylabel(0(200)1000)  saving(Graph2, replace) title(Norway industry trends)

*Combine into same figure
graph combine Graph1.gph Graph2.gph, col(2) iscale(.8) ysize(5) xsize(15) commonscheme  graphregion(fcolor(white) color(white))

* Export the combined graphs 
graph export "$graphs/descriptive_dummy_fin_nor_combined.eps", as(eps) name("Graph") replace

*Black and white 

tw (connected index_gross_fin year if decile_repashare_2==2, lcolor(gs0) msymbol(Oh) mcolor(gs0))  (line index_gross_fin year if decile_repashare_2==5, lcolor(gs10)  lpattern(dash) msymbol(T) mcolor(gs10)) (connected index_gross_fin year if decile_repashare_2==0, lcolor(gs14) msymbol(Dh) mcolor(gs14)),  xline(1944)  xline(1952) ///
   legend(position(6) rows(2) symxsize(*.5) label(1 "Reparation Industries") label(2 "Established Industries") label(3 "Non-Reparation Manufacturing"))  xlabel(1935(5)1970)  graphregion(lcolor(white) fcolor(white)) ytitle(Index of production value) ///
   xline(1939, lcolor(black) lpattern(dash)) ///
   xline(1940, lcolor(black) lpattern(dash)) ///
   xline(1941, lcolor(gs12) lpattern(shortdash)) ///  
   xline(1944, lcolor(gs12) lpattern(shortdash)) /// 
   text(700 1939.5 "First Soviet-Finnish War", size(small) orient(vertical)) ///
   text(600 1942.5 "Second Soviet-Finnish War", size(small) orient(vertical)) ///
   text(700 1948 "War reparations", size(small) angle(vertical)) ///
   ylabel(0(200)1000) ///
   saving(Graph1_bw.gph, replace) ///
   title("Finland industry trends")


tw (connected index_gross_nor year if decile_repashare_2==2, lcolor(gs0) msymbol(Oh) mcolor(gs0)) (line index_gross_nor year if decile_repashare_2==5, lcolor(gs10) lpattern(dash) msymbol(T) mcolor(gs10))  (connected index_gross_nor year if decile_repashare_2==0, lcolor(gs14) msymbol(Dh) mcolor(gs14)),   xline(1944) xline(1952) legend(position(6) rows(2) symxsize(*.5) label(1 "Reparation Industries") label(2 "Established Industries") label(3 "Non-Reparation Manufacturing")) xlabel(1935(5)1970) graphregion(lcolor(white) fcolor(white)) ytitle(Index of production value) ///
   xline(1939, lcolor(black) lpattern(dash)) ///
   xline(1940, lcolor(black) lpattern(dash)) ///
   xline(1941, lcolor(gs12) lpattern(shortdash)) /// 
   xline(1944, lcolor(gs12) lpattern(shortdash)) /// 
   text(700 1939.5 "First Soviet-Finnish War", size(small) orient(vertical)) ///
   text(600 1942.5 "Second Soviet-Finnish War", size(small) orient(vertical)) ///
   text(700 1948 "War reparations", size(small) angle(vertical)) ///
   ylabel(0(200)1000) ///
   saving(Graph2_bw.gph, replace) ///
   title("Norway industry trends")

* Combine the two black-and-white graphs
graph combine Graph1_bw.gph Graph2_bw.gph, col(2) iscale(.8) ysize(5) xsize(15) commonscheme ///
graphregion(fcolor(white) color(white))

* Export the combined graphs 
graph export "$graphs/descriptive_dummy_fin_nor_combined_bw.eps", as(eps)  replace
graph export "$graphs/descriptive_dummy_fin_nor_combined_bw.pdf", as(pdf)  replace

restore

********
*Figure 3, with Norway DDD
********

drop repa*

*Use the consistent reparations measure across countries
global treat treat_std_l3

drop if year==1970 // Not in Norway

forvalues x=34/69 {
gen ydum19`x'=0
replace ydum19`x'=1 if year==19`x'
}

forvalues x=34(1)69{
	gen repam19`x'=ydum19`x'*$treat
	}

forvalues x=34(1)69{
	gen repaml19`x'=ydum19`x'*finland*$treat
	}
	
forvalues x=34(1)69{
	gen fin19`x'=ydum19`x'*finland
	}
	
local joku "1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969"

foreach l of local joku {
label var repam`l'  `l'
}

*Create interactons

local repaflexible " repam1934 repam1935 repam1936 repam1937 repam1938 repam1939 repam1940 repam1941 repam1942  repam1944 repam1945 repam1946 repam1947 repam1948 repam1949 repam1950 repam1951 repam1952 repam1953 repam1954 repam1955 repam1956 repam1957 repam1958 repam1959 repam1960 repam1961 repam1962 repam1963 repam1964 repam1965 repam1966 repam1967 repam1968 repam1969  "

local repaflexible2 " repaml1934 repaml1935 repaml1936 repaml1937 repaml1938 repaml1939 repaml1940 repaml1941 repaml1942  repaml1944 repaml1945 repaml1946 repaml1947 repaml1948 repaml1949 repaml1950 repaml1951 repaml1952 repaml1953 repaml1954 repaml1955 repaml1956 repaml1957 repaml1958 repaml1959 repaml1960 repaml1961 repaml1962 repaml1963 repaml1964 repaml1965 repaml1966 repaml1967 repaml1968 repaml1969  "

local finflex " fin1934 fin1935 fin1936 fin1937 fin1938 fin1939 fin1940 fin1941 fin1942  fin1944 fin1945 fin1946 fin1947 fin1948 fin1949 fin1950 fin1952 fin1953 fin1954 fin1955 fin1956 fin1957 fin1958 fin1959 fin1960 fin1961 fin1962 fin1963 fin1964 fin1965 fin1966 fin1967 fin1968 fin1969  "

tempfile t1 t2 t3 t4

parmby  "reghdfe ln_value_prod  `repaflexible'  `repaflexible2' `finflex', absorb(year_country isic_country   $sharecontrols2) vce(cluster isic_country)", lab saving(`"`t1'"',replace) idn(1) ids(Unadjusted)
test (repam1934=0) (repam1935=0) (repam1936=0) (repam1937=0) (repam1938=0) (repam1939=0) (repam1940=0) (repam1941=0) (repam1942=0) 
	
parmby  "reghdfe lnlabor_all  `repaflexible' `repaflexible2'  `finflex', absorb(year_country isic_country   $sharecontrols2) vce(cluster isic_country)", lab saving(`"`t2'"',replace) idn(1) ids(Unadjusted)
test (repam1934=0) (repam1935=0) (repam1936=0) (repam1937=0) (repam1938=0) (repam1939=0) (repam1940=0) (repam1941=0) (repam1942=0) 

	
preserve

clear all
set obs 1
gen year =1943
gen estimate = 0
gen parm ="repaml1943"
gen min95 =0
gen max95 =0
append using `t1'
keep if regexm(parm, "^repa*")
keep if _n>35|year ==1943
drop if parmseq==35
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr

twoway  (scatter estimate  yearstr, msize(medium) mcolor(dknavy)) (rspike   min95 max95 yearstr , lcolor(dknavy)), xsize(6) ysize(4) xtitle(Year, size(medium)) xline(1944) xline(1952) title("Triple-Difference Estimates of  ln Value of Production")  ///
 xlabel(1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 ///
 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 ) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off)  xlabel(#8)   ylabel(,grid nogextend)  ytitle("", margin(0 1 0 0)) ytick(-.2 0 .2 .4)  saving(prod_ddd.gph, replace)
 
*Black and white
 
twoway (rspike min95 max95 yearstr, lcolor(gs10)) (scatter estimate yearstr, msize(medium) mcolor(gs0))  , xsize(6) ysize(4) ///
        xtitle(Year, size(medium)) ///
        xline(1944, lcolor(gs10)) /// 
        xline(1952, lcolor(gs10)) /// 
        title("Triple-Difference Estimates of ln Value of Production") ///
        xlabel(1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 ///
               1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969) ///
        plotregion(lcolor(white)) ///
        graphregion(lcolor(white) fcolor(white) color(white)) ///
        legend(off) ///
        xlabel(#8) ///
        ylabel(,grid nogextend) ///
        ytitle("", margin(0 1 0 0)) ///
        ytick(-.2 0 .2 .4) ///
        saving(prod_ddd_bw.gph, replace) 
restore


preserve

clear all
set obs 1
gen year =1943
gen estimate = 0
gen parm ="repaml1943"
gen min95 =0
gen max95 =0
append using `t2'
keep if regexm(parm, "^repa*")
keep if _n>35|year ==1943
drop if parmseq==35
gen yearstr =substr(parm, -4,4)
destring yearstr, replace
sort yearstr
twoway  (scatter estimate  yearstr, msize(medium) mcolor(dknavy)) (rspike   min95 max95 yearstr , lcolor(dknavy)), xsize(6) ysize(4) xtitle(Year, size(medium)) xline(1944) xline(1952) title("Triple-Difference Estimates of  ln Labor Force")  ///
xlabel(1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970, ) plotregion(lcolor(white)) graphregion(lcolor(white) fcolor(white) color(white)) legend(off)  xlabel(#8)   ylabel(,grid nogextend)  ytitle("", margin(0 1 0 0))   saving(labor_ddd.gph, replace)


*Black and white 

twoway (rspike min95 max95 yearstr, lcolor(gs10)) (scatter estimate yearstr, msize(medium) mcolor(gs0)), xsize(6) ysize(4)   xtitle(Year, size(medium)) xline(1944, lcolor(gs10)) /// 
        xline(1952, lcolor(gs10)) /// 
        title("Triple-Difference Estimates of ln Labor Force") ///
        xlabel(1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970, ) ///
        plotregion(lcolor(white)) ///
        graphregion(lcolor(white) fcolor(white) color(white)) ///
        legend(off) ///
        xlabel(#8) ///
        ylabel(,grid nogextend) ///
        ytitle("", margin(0 1 0 0)) ///
        saving(labor_ddd_bw.gph, replace) 
restore	


*Combine to Figure 5

graph combine flexible_prod_fin.gph prod_ddd.gph ,  col(2) iscale(.8) ysize(5) xsize(15) commonscheme  graphregion(fcolor(white) color(white))

graph export "$graphs/combined_DDD_prod2.eps",as(eps)   font(Times) replace
graph export "$graphs/combined_DDD_prod2.pdf",as(pdf)   font(Times) replace

graph combine flexible_labor_fin.gph labor_ddd.gph ,  col(2) iscale(.8) ysize(5) xsize(15)commonscheme  graphregion(fcolor(white) color(white))

graph export "$graphs/combined_DDD_l2.eps",as(eps)   font(Times) replace
graph export "$graphs/combined_DDD_l2.pdf",as(pdf)   font(Times) replace


*Combine black and white Figure 5

graph combine flexible_prod_fin_bw.gph prod_ddd_bw.gph ,  col(2) iscale(.8) ysize(5) xsize(15) commonscheme  graphregion(fcolor(white) color(white))

graph export "$graphs/combined_DDD_prod_bw.eps",as(eps)   font(Times) replace
graph export "$graphs/combined_DDD_prod_bw.pdf",as(pdf)   font(Times) replace

graph combine flexible_labor_fin_bw.gph labor_ddd_bw.gph ,  col(2) iscale(.8) ysize(5) xsize(15)commonscheme  graphregion(fcolor(white) color(white))

graph export "$graphs/combined_DDD_l_bw.eps",as(eps)   font(Times) replace
graph export "$graphs/combined_DDD_l_bw.pdf",as(pdf)   font(Times) replace
